<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>弹球小游戏</title>
    <script src="main.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        #start-button {
            width: 80px;
            height: 50px;
            line-height: 50px;
            text-align: center;
            background-color: #00a4ff;
            box-shadow: 0px 0px 20px #ddd;
            margin: 200px auto;
        }

        #select-mode {
            display: none;
            position: relative;
            width: 300px;
            height: 300px;
            margin: 50px auto;
            margin-top: 200px;
        }

        #select-mode #normal {
            position: absolute;
            left: 0;
            width: 85px;
            height: 50px;
            line-height: 50px;
            text-align: center;
            background-color: #00a4ff;
            box-shadow: 0px 0px 20px #ddd;
        }

        #select-mode #speed {
            position: absolute;
            right: 0;
            width: 85px;
            height: 50px;
            line-height: 50px;
            text-align: center;
            background-color: #00a4ff;
            box-shadow: 0px 0px 20px #ddd;
        }

        #select-mode #tips {
            position: absolute;
            bottom: 10px;
        }

        #gameUI {
            display: none;
            width: 576px;
            margin: 0 auto;
        }

        #gameUI canvas {
            display: block;
            top: 30px;
            background-color: #000;
            border: 1px solid #000;
        }

        #author {
            /* position: absolute; */
            /* display: none; */
            /* position: relative; */
            /* bottom: 10%;
            left: 50%;
            transform: translateX(-50%); */
            width: 576px;
            color: blue;
            margin: 0 auto;
            margin-top: 50px;
        }

        #author p {
            font-size: 26px;
        }
    </style>
</head>
<body>
    <!-- 开始按钮 -->
    <div id="start-button">Start</div>

    <!-- 选择游戏模式 -->
    <div id="select-mode">
        <div id="normal">普通模式</div>
        <div id="speed">变速模式</div>
        <p id="tips">游戏规则：玩家使用方向键左右控制挡板，将小球反弹，若玩家没有接住小球，则游戏结束<br>变速模式下球每被玩家反弹一次都会略微加速，这将加快游戏节奏。</p>
    </div>

    <!-- 游戏界面 -->
    <div id="gameUI">
        <!-- 分数及历史最高分 -->
        <h1 id="score">Score: 0</h1>
        <h1 id="historyMaxScore">history: 0</h1>
        <!-- 游戏画布 -->
        <!-- <canvas id="myCanvas" width="480" height="320"></canvas> -->
        <canvas id="myCanvas" width="576" height="384"></canvas>
    </div>

    <!-- 作者声明 -->
    <div id="author">
        <p>制作者：20物联网二班-马锦琦 2021-9-12</p>
        <p>接住小球让小球反弹，不要让小球碰到下边缘。</p>
    </div>
</body>
</html>